Skip to content

Invalidate caches after a hot reload #2641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

srujzs
Copy link
Contributor

@srujzs srujzs commented Jun 28, 2025

Many of the caches we computed on the original load need to be invalidated. Previously, we pessimistically tore down the caches and reinitialized them. With this PR, a ModifiedModuleReport is computed that allows us to only invalidate and recompute information for modules/libraries that were either deleted or reloaded.

Specifically, the caches in MetadataProvider, Modules, Locations, SkipLists, AppInspector, and LibraryHelper are now specially invalidated and recomputed.

Removes an existing option to use the module URI instead of the module name in the MetadataProvider. This option is not relevant until we can unify this change across the ecosystem.

Fixes #2628.

@srujzs srujzs changed the title Invalidate deleted modules and libraries and process reloaded modules and libraries in provider Invalidate caches after a hot reload Jul 1, 2025
@srujzs srujzs requested review from nshahan and bkonyi July 1, 2025 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resetting of location and source information on hot reload should only invalidate the changed libraries
1 participant